package com.dexin.rabbitmq;

import com.dexin.rabbitmq.service.ReceiveService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringbootReceiveApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(SpringbootReceiveApplication.class, args);
        ReceiveService receiveService = (ReceiveService) context.getBean("receiveService");
        receiveService.receive();
    }

}
